*6/17/2015
*Author: Matthias Mader
*These files will reproduce the findings reported in:
*Mader, Matthias, 2015. Citizens� Perceptions of Policy Objectives and Support for Military Action: Looking for Prudence in Germany, in Journal of Conflict Resolution.
*Use Stata/SE 13.1 to run. File path of data set (mader2015_jcr_stata_data.dta) must be specified in row 11.

*Package coefplot (version 1.7.1) from http://fmwww.bc.edu/RePEc/bocode/c required to run code.

************************************************************************************************************************************
*Open data set
	use "C:\...\mader2015_jcr_stata_data.dta", replace
	
************************************************************************************************************************************
*Descriptive statistics
	
*Figure 2: Descriptive statistics of support for German ISAF mission (Figure created in Excel)
	tab afgh_d year [aweight = gewicht] , nofreq column
	tab afgh_d year [aweight = gewicht] if awa_d == 0 , nofreq column
	tab afgh_d awa_d [aweight = gewicht] if awa_d == 1 , nofreq column	
	

*Table 1: Descriptive statistics of explanatory factors
	*POs
	tab nrpo year [aweight = gewicht] , nofreq column
	tab nrpo awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab nrpo awa_d [aweight = gewicht] if year == 2009 , nofreq column

	sum nrpo [aweight = gewicht] if year == 2008
	sum nrpo [aweight = gewicht] if year == 2008 & awa_d == 0
	sum nrpo [aweight = gewicht] if year == 2008 & awa_d == 1		
	sum nrpo [aweight = gewicht] if year == 2009
	sum nrpo [aweight = gewicht] if year == 2009 & awa_d == 0
	sum nrpo [aweight = gewicht] if year == 2009 & awa_d == 1
		
	tab fpr year [aweight = gewicht] , nofreq column
	tab fpr awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab fpr awa_d [aweight = gewicht] if year == 2009 , nofreq column

	tab coin year [aweight = gewicht] , nofreq column
	tab coin awa_d [aweight = gewicht] if year == 2009 , nofreq column
	
	tab bp year [aweight = gewicht] , nofreq column
	tab bp awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab bp awa_d [aweight = gewicht] if year == 2009 , nofreq column
		
	tab ps year [aweight = gewicht] , nofreq column
	tab ps awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab ps awa_d [aweight = gewicht] if year == 2009 , nofreq column
		
	tab dem year [aweight = gewicht] , nofreq column
	tab dem awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab dem awa_d [aweight = gewicht] if year == 2009 , nofreq column
		
	tab mid year [aweight = gewicht] , nofreq column
	tab mid awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab mid awa_d [aweight = gewicht] if year == 2009 , nofreq column

	*Predispositions and perceived success
	tab inter year [aweight = gewicht] , nofreq column
	tab inter awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab inter awa_d [aweight = gewicht] if year == 2009 , nofreq column
		
	tab antimili_d year [aweight = gewicht] , nofreq column
	tab antimili_d awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab antimili_d awa_d [aweight = gewicht] if year == 2009 , nofreq column	
		
	tab atla_d year [aweight = gewicht] , nofreq column
	tab atla_d awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab atla_d awa_d [aweight = gewicht] if year == 2009 , nofreq column

	tab succ_d year [aweight = gewicht] , nofreq column
	tab succ_d awa_d [aweight = gewicht] if year == 2008 , nofreq column
	tab succ_d awa_d [aweight = gewicht] if year == 2009 , nofreq column
	
************************************************************************************************************************************			
*Multivariate statistics

*Table 2: Effects of Perceived Objectives and Policy Predispositions on ISAF Mission Support in 2008 and 2009 (by Political Awareness)

	reg afgh fpr coin bp ps dem mid po2 awa ///
		inter antimili atla  ///
		if year == 2008 & incl == 1 [pweight = gewicht]

	margins , dydx(fpr coin bp ps dem mid po2 awa inter antimili atla ) post
	estimates store y2008
	
	reg afgh fpr coin bp ps dem mid po2 awa ///
		inter antimili atla  ///
		if year == 2009 & incl == 1 [pweight = gewicht]

	margins , dydx(fpr coin bp ps dem mid po2 awa inter antimili atla ) post
	estimates store y2009

	reg afgh fpr bp ps dem mid po1 ///
		inter antimili atla ///
		if year == 2008 & awa_d == 0 & incl == 1 [pweight = gewicht]

	reg afgh fpr bp ps dem mid po1 ///
		inter antimili atla ///
		if year == 2008 & awa_d == 1 & incl == 1 [pweight = gewicht]

	reg afgh fpr coin bp ps dem mid po1 ///
		inter antimili atla ///
		if year == 2009 & awa_d == 0 & incl == 1 [pweight = gewicht]
			
	reg afgh fpr coin bp ps dem mid po1 ///
		inter antimili atla ///
		if year == 2009 & awa_d == 1 & incl == 1 [pweight = gewicht]

	*Difference in effects among politically unaware (columns 3 and 6 of Table 2)
		reg afgh fpr##i.awa_d coin##i.awa_d bp##i.awa_d ps##i.awa_d ///
			dem##i.awa_d mid##i.awa_d po2##i.awa_d ///
			c.inter##i.awa_d c.antimili##i.awa_d c.atla##i.awa_d 1.po2#1.awa_d ///
			if year == 2008 & incl == 1 [pweight = gewicht]		
	*Difference in effects among politically aware
		reg afgh fpr##i.awa_d coin##i.awa_d bp##i.awa_d ps##i.awa_d ///
			dem##i.awa_d mid##i.awa_d po2##i.awa_d ///
			c.inter##i.awa_d c.antimili##i.awa_d c.atla##i.awa_d ///
			if year == 2009 & incl == 1 [pweight = gewicht]		

	
*Figure 3: Effects of Perceived Objectives and Policy Predispositions on ISAF Mission Support in 2008 and 2009
	coefplot (y2008 , label(2008) color(black) ciopts(color(black))  ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Antimilitarism" atla = "Atlanticism" awa = "Political Awareness")) ///
		(y2009 , label(2009) color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Antimilitarism" atla = "Atlanticism" awa = "Political Awareness")) ///
		, omitted xline(0 , lcolor(black)) graphregion(color(white)) ///
		 xscale(range(-.6 .6)) xlabel(-.6 (.2) .6) xmtick(-.6 (.1) .6) ///
		 title("ISAF Mission Support", size(med) color(gs0))  bgcolor(white) grid(glcolor(gs15))
	window manage close graph			 
	
*Table A3.1: Determinants of perceived success and mission support in 2008 and 2008 (Regression table corresponding to figure 4)
	*DV: mission success
		reg succ fpr coin bp ps dem mid po2 awa ///
			inter antimili atla  ///
			if year == 2008 & incl == 1 [pweight = gewicht]

		margins , dydx(fpr coin bp ps dem mid po2 awa inter antimili atla ) post
		estimates store y2008suc

		reg succ fpr coin bp ps dem mid po2 awa ///
			inter antimili atla  ///
			if year == 2009 & incl == 1 [pweight = gewicht]
		
		margins , dydx(fpr coin bp ps dem mid po2 awa inter antimili atla ) post
		estimates store y2009suc
			
	*DV: mission support		
		reg afgh fpr coin bp ps dem mid po2 awa ///
			inter antimili atla  succ ///
			if year == 2008 & incl == 1 [pweight = gewicht]
			estadd fitstat

		margins , dydx(fpr coin bp ps dem mid po2 awa inter antimili atla  succ) post
		estimates store y2008sup

		reg afgh fpr coin bp ps dem mid po2 awa ///
			inter antimili atla  succ ///
			if year == 2009 & incl == 1 [pweight = gewicht]
		
		margins , dydx(fpr coin bp ps dem mid po2 awa inter antimili atla  succ) post
		estimates store y2009sup
			
*Figure 4, Part 1; Average effects of PO, Policy Predispositions, and Perceived Success	on ISAF Mission Support	
	coefplot (y2008sup , label(2008) color(black) ciopts(color(black)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" awa = "Political Awareness" ///
		inter = "Internationalism" antimili = "Antimilitarism" atla = "Atlanticism" succ = "Perceived Success")) ///
		(y2009sup , label(2009)color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" awa = "Political Awareness" ///
		inter = "Internationalism" antimili = "Antimilitarism" atla = "Atlanticism" succ = "Perceived Success")) ///
		, omitted xline(0 , lcolor(black)) graphregion(color(white)) ///
		xscale(range(-.6 .6)) xlabel(-.6 (.2) .6) xmtick(-.6 (.1) .6) ///
		title("ISAF Mission Support", size(med) color(gs0)) bgcolor(white) grid(glcolor(gs15))
	window manage close graph							
	
*Figure 4, Part 2; Average effects of PO, Policy Predispositions on Perceived Success
	coefplot (y2008suc , label(2008) color(black) ciopts(color(black)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" awa = "Political Awareness" ///
		inter = "Internationalism" antimili = "Antimilitarism" atla = "Atlanticism"  succ = "Perceived Success")) ///
		(y2009suc , label(2009)color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" awa = "Political Awareness"  ///
		inter = "Internationalism" antimili = "Antimilitarism" atla = "Atlanticism" succ = "Perceived Success")) ///
		, omitted xline(0 , lcolor(black)) graphregion(color(white)) ///
		xscale(range(-.6 .6)) xlabel(-.6 (.2) .6) xmtick(-.6 (.1) .6) ///
		title("Perceived ISAF Mission Success", size(med) color(gs0)) bgcolor(white) grid(glcolor(gs15))
	window manage close graph		 
			

*Table A5.1: Effects of Perceived Objectives and Policy Predispositions on ISAF Mission Support in 2008 and 2009 (by Political Awareness)

	*Political awareness low
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla ///
		if year == 2008 & awa_d == 0 & incl == 1 [pweight = gewicht]
	estimates store y2008awa0
					
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla ///
		if year == 2009 & awa_d == 0 & incl == 1 [pweight = gewicht]
	estimates store y2009awa0
	
	*Political awareness high
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla ///
		if year == 2008 & awa_d == 1 & incl == 1 [pweight = gewicht]
	estimates store y2008awa1
	
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla ///
		if year == 2009 & awa_d == 1 & incl == 1 [pweight = gewicht]
	estimates store y2009awa1
						
	
*Figure A5.1: Effects of Perceived Objectives and Policy Predispositions on ISAF Mission Support in 2008 and 2009 (by political awareness; Corresponds to Figure 3)
	estimates restore y2008awa0
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2008awa0

	estimates restore y2008awa1
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2008awa1
	
	estimates restore y2009awa0
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2009awa0
	
	estimates restore y2009awa1
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2009awa1

	coefplot (y2008awa0 , label(Low Awareness, 2008) color(black) ciopts(color(black))  ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		(y2008awa1 , label(High Awareness, 2008) msymbol(triangle)  color(black) ciopts(color(black))  ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		(y2009awa0 , label(Low Awareness, 2009) color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		(y2009awa1 , label(High Awareness, 2009) msymbol(triangle) color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		, omitted xline(0 , lcolor(black)) graphregion(color(white)) ///
		 xscale(range(-.6 .6)) xlabel(-.6 (.2) .6) xmtick(-.6 (.1) .6) ///
		 title("ISAF Mission Support", size(med) color(gs0))   bgcolor(white) grid(glcolor(gs15))
	window manage close graph						
		
*Table A5.2: Effects of Perceived Objectives and Policy Predispositions on Perceived ISAF Mission Success in 2008 and 2009 (by Political Awareness)
			reg succ fpr coin bp ps dem mid po2 ///
							inter antimili atla ///
							if year == 2008 & awa_d == 0 & incl == 1 [pweight = gewicht]
			estimates store	y2008sucawa0

			reg succ fpr coin bp ps dem mid po2 ///
							inter antimili atla ///
							if year == 2009 & awa_d == 0 & incl == 1 [pweight = gewicht]
			estimates store  y2009sucawa0
			
			reg succ fpr coin bp ps dem mid po2 ///
							inter antimili atla ///
							if year == 2008 & awa_d == 1 & incl == 1 [pweight = gewicht]
			estimates store  y2008sucawa1
			
			reg succ fpr coin bp ps dem mid po2 ///
							inter antimili atla ///
							if year == 2009 & awa_d == 1 & incl == 1 [pweight = gewicht]
			estimates store  y2009sucawa1

	*Difference in effects between 2008 and 2009 among politically unaware
		reg succ fpr##i.y2009 coin##i.y2009 bp##i.y2009 ps##i.y2009 ///
			dem##i.y2009 mid##i.y2009 po2##i.y2009 ///
			c.inter##i.y2009 c.antimili##i.y2009 c.atla##i.y2009 ///
			if awa_d == 0 & incl == 1 [pweight = gewicht]		
								
	*Difference in effects between 2008 and 2009 among politically aware
		reg succ fpr##i.y2009 coin##i.y2009 bp##i.y2009 ps##i.y2009 ///
			dem##i.y2009 mid##i.y2009 po2##i.y2009 ///
			c.inter##i.y2009 c.antimili##i.y2009 c.atla##i.y2009 ///
			if awa_d == 1 & incl == 1 [pweight = gewicht]		
					
*Table A5.3: Effects of Perceived Objectives, Policy Predispositions, and Perceived Success on Perceived ISAF Mission Support in 2008 and 2009 (by Political Awareness)
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla succ ///
		if year == 2008 & awa_d == 0 & incl == 1 [pweight = gewicht]
	estimates store  y2008afghawa0
			
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla succ ///
		if year == 2009 & awa_d == 0 & incl == 1 [pweight = gewicht]
	estimates store  y2009afghawa0
			
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla succ ///
		if year == 2008 & awa_d == 1 & incl == 1 [pweight = gewicht]
	estimates store  y2008afghawa1
			
	reg afgh fpr coin bp ps dem mid po2 ///
		inter antimili atla succ ///
		if year == 2009 & awa_d == 1 & incl == 1 [pweight = gewicht]
	estimates store  y2009afghawa1
			
	*Difference in effects between 2008 and 2009 among politically unaware
		reg afgh fpr##i.y2009 coin##i.y2009 bp##i.y2009 ps##i.y2009 ///
			dem##i.y2009 mid##i.y2009 po2##i.y2009 ///
			c.inter##i.y2009 c.antimili##i.y2009 c.atla##i.y2009 c.succ##i.y2009 ///
			if awa_d == 0 & incl == 1 [pweight = gewicht]		
								
	*Difference in effects between 2008 and 2009 among politically aware
		reg afgh fpr##i.y2009 coin##i.y2009 bp##i.y2009 ps##i.y2009 ///
			dem##i.y2009 mid##i.y2009 po2##i.y2009 ///
			c.inter##i.y2009 c.antimili##i.y2009 c.atla##i.y2009 c.succ##i.y2009 ///
			if awa_d == 1 & incl == 1 [pweight = gewicht]		
			
*Figure A5.2: Regression of Mission success on perceived objectives and predispositions, Mission Support with IV Perceived Success (like Figure 4, but by political awareness)	
	*Margins Success
	estimates restore y2008sucawa0
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2008sucawa0m

	estimates restore y2009sucawa0
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2009sucawa0m
	
	
	estimates restore y2008sucawa1
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2008sucawa1m
	
	estimates restore y2009sucawa1
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla) post
	estimates store y2009sucawa1m	
	
	*Margins Afgh
	estimates restore y2008afghawa0
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla succ) post
	estimates store y2008afghawa0m

	estimates restore y2009afghawa0
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla succ) post
	estimates store y2009afghawa0m
	
	
	estimates restore y2008afghawa1
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla succ) post
	estimates store y2008afghawa1m
	
	estimates restore y2009afghawa1
	margins , dydx(fpr coin bp ps dem mid po2 inter antimili atla succ) post
	estimates store y2009afghawa1m	
	
	coefplot (y2008sucawa0m , label(Low Awareness, 2008) color(black) ciopts(color(black))  ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		(y2008sucawa1m , label(High Awareness, 2008) msymbol(triangle)  color(black) ciopts(color(black))  ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		(y2009sucawa0m , label(Low Awareness, 2009) color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		(y2009sucawa1m , label(High Awareness, 2009) msymbol(triangle) color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism")) ///
		, omitted xline(0 , lcolor(black)) graphregion(color(white)) ///
		 xscale(range(-.6 .6)) xlabel(-.6 (.2) .6) xmtick(-.6 (.1) .6) ///
		 title("Perceived ISAF Mission Success", size(med) color(gs0))   bgcolor(white) grid(glcolor(gs15))
	window manage close graph	

	coefplot (y2008afghawa0m , label(Low Awareness, 2008) color(black) ciopts(color(black))  ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism" succ = "Perceived Success")) ///
		(y2009afghawa0m , label(High Awareness, 2008) msymbol(triangle)  color(black) ciopts(color(black))  ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism" succ = "Perceived Success")) ///
		(y2008afghawa1m , label(Low Awareness, 2009) color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism" succ = "Perceived Success")) ///
		(y2009afghawa1m , label(High Awareness, 2009) msymbol(triangle) color(gs10) ciopts(color(gs10)) ///
		rename(fpr = "PO: Fight Terrorism" coin = "PO: Counterinsurgency" bp = "PO: Peace Keeping" ps = "PO: Nation Building" ///
		dem = "PO: Democratization" mid = "PO: Meet Intern. Obligations" po2 = "No. of PO > 1" ///
		inter = "Internationalism" antimili = "Pacifism" atla = "Atlanticism" succ = "Perceived Success")) ///
		, omitted xline(0 , lcolor(black)) graphregion(color(white)) ///
		 xscale(range(-.6 .6)) xlabel(-.6 (.2) .6) xmtick(-.6 (.1) .6) ///
		 title("ISAF Mission Support", size(med) color(gs0))   bgcolor(white) grid(glcolor(gs15))
	window manage close graph	
		
*Table A2.1: Descriptive statistics of perceived mission objectives in 2008, original coding
	tab1 fpr1_2008 fpr2_2008 /// 
		ps1_2008 ps2_2008 /// 
		bp1_2008 /// 
		dem1_2008 /// 
		mid1_2008 mid2_2008 /// 
		misc1_2008 misc2_2008 misc3_2008 misc4_2008 misc5_2008 misc6_2008
			
*Table A2.2: Effects of perceived policy objectives, political awareness and domain-specific predispositions ISAF mission support in 2008 (original categories of perceived objectives)
	reg afgh fpr1_2008 fpr2_2008 ///
		ps1_2008 ps2_2008 ///
		bp1_2008 ///
		dem1_2008 ///
		mid1_2008 mid2_2008 ///
		misc1_2008 misc2_2008 misc3_2008 misc4_2008 misc5_2008 misc6_2008 ///
		awa ///
		inter antimili atla ///
		if year == 2008 [pweight = gewicht]
			
*Table A2.3: Descriptive statistics of perceived mission objectives in 2009, original coding
	tab1 fpr1_2009 ///
		count1_2009 ///
		ps1_2009 ps2_2009 ps3_2009 ps4_2009 ///
		bp1_2009 bp2_2009 /// 
		dem1_2009 dem2_2009 /// 
		mid1_2009 mid2_2009 /// 
		misc1_2009 misc2_2009 misc3_2009 misc4_2009 misc5_2009 misc6_2009
			
*Table A2.4: Effects of perceived policy objectives, political awareness and domain-specific predispositions ISAF mission support in 2009 (original categories of perceived objectives)
	reg afgh  fpr1_2009 /// 
		count1_2009 /// 
		ps1_2009 ps2_2009 ps3_2009 ps4_2009 /// 
		bp1_2009 bp2_2009 /// 
		dem1_2009 dem2_2009 /// 
		mid1_2009 mid2_2009 /// 
		misc1_2009 misc2_2009 misc3_2009 misc4_2009 misc5_2009 misc6_2009 ///
		awa ///
		inter antimili atla ///
		if year == 2009 [pweight = gewicht]
				
*Figure A6.1: No. of perceived objectives and mission support
	*Without controls
	reg afgh i.year##i.nrpo2 ///
		[pweight = gewicht]
	margins, dydx(nrpo2) at(year=(2008 2009))
	margins, at(nrpo2=(0(1)3) year=(2008 2009))
	marginsplot, graphregion(color(white)) title("Controls: None") yscale(range(.4 .8)) ylabel(.4 (.1) .8) scheme(s2mono) ytitle(Linear Prediction of ISAF mission support) ///
		plot1opts(lcolor(gs0) mcolor(gs0)) ///
		plot2opts(lcolor(gs10) mcolor(gs10)) ///
		ci1opts(lcolor(gs0)) ///
		ci2opts(lcolor(gs10))
	window manage close graph
	
	*With controls for political awareness and socio-demographics
	reg afgh i.year##i.nrpo2 ///
		awa edu_hi edu_lo age female east  ///
		[pweight = gewicht]	
	margins, at(nrpo2=(0(1)3) year=(2008 2009))
	marginsplot, graphregion(color(white)) title("Controls: Political awareness & socio-demographics") yscale(range(.4 .8)) ylabel(.4 (.1) .8) scheme(s2mono) ytitle(Linear Prediction of ISAF mission support) ///
		plot1opts(lcolor(gs0) mcolor(gs0)) ///
		plot2opts(lcolor(gs10) mcolor(gs10)) ///
		ci1opts(lcolor(gs0)) ///
		ci2opts(lcolor(gs10))
	window manage close graph		
					
	*With all controls	
	reg afgh i.year##i.nrpo2 ///
		inter antimili atla awa edu_hi edu_lo age female east ///
		[pweight = gewicht]	
	margins, at(nrpo2=(0(1)3) year=(2008 2009))
	marginsplot, graphregion(color(white)) title("Controls: Political awareness & socio-demographics" "& predispositions") yscale(range(.4 .8)) ylabel(.4 (.1) .8) scheme(s2mono) ytitle(Linear Prediction of ISAF mission support) ///
		plot1opts(lcolor(gs0) mcolor(gs0)) ///
		plot2opts(lcolor(gs10) mcolor(gs10)) ///
		ci1opts(lcolor(gs0)) ///
		ci2opts(lcolor(gs10))
	window manage close graph	
	
	
*Table A6.1: Effects of Number of Perceived Objectives in 2008 and 2009
	reg afgh i.nrpo2 [pweight = gewicht] if year == 2008
						
	reg afgh i.nrpo2 [pweight = gewicht] if year == 2009

	reg afgh i.nrpo2 awa edu_lo edu_hi age female east [pweight = gewicht] if year == 2008
						
	reg afgh i.nrpo2 awa edu_lo edu_hi age female east [pweight = gewicht] if year == 2009
		
	reg afgh i.nrpo2 inter antimili atla awa edu_lo edu_hi age female east [pweight = gewicht] if year == 2008
						
	reg afgh i.nrpo2 inter antimili atla awa edu_lo edu_hi age female east [pweight = gewicht] if year == 2009
				
*Table A7.1: The Determinants of the Perceived Policy Objectives (Logit coefficients), 2008
*Table A7.2: The Determinants of the Perceived Policy Objectives (Average Marginal Effects), 2008
	logit fpr ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2008
	margins, dydx(_all)
		
	logit bp ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2008
	margins, dydx(_all)
		
	logit ps ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2008
	margins, dydx(_all)
		
	logit dem ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2008
	margins, dydx(_all)
		
	logit mid ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2008
	margins, dydx(_all)

*Table A7.3: The Determinants of the Perceived Policy Objectives (Logit coefficients), 2009
*Table A7.4: The Determinants of the Perceived Policy Objectives (Average Marginal Effects), 2009
	logit fpr ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2009
	margins, dydx(_all) post
		
	logit coin ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2009
	margins, dydx(_all) post
		
	logit bp ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2009
	margins, dydx(_all) post

	logit ps ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2009
	margins, dydx(_all) post
	
	logit dem ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]		if year == 2009
	margins, dydx(_all) post
		
	logit mid ///
		inter antimili atla awa edu_lo edu_hi age female east ///
		[pweight = gewicht]	if year == 2009
	margins, dydx(_all) post
		
*Table A8.1: Interaction Effects of Perceived Objective and Policy Predisposition on ISAF Mission Support (column 1: 2008)
 	reg afgh (fpr bp ps dem mid)##(inter c.antimili c.atla) po2 c.awa ///
		[pweight = gewicht] if year == 2008
		
*Figure A8.1: AMEs of Perceived Objectives, 2008 (Figure created in Excel)
	margins, dydx(fpr bp ps dem mid) at(inter=(0 1))
	margins, dydx(fpr bp ps dem mid) at(antimili=(0 1))
	margins, dydx(fpr bp ps dem mid) at(atla=(0 1))
	
*Figure A8.3: Linear prediction of ISAF mission support conditional on PO �Democratization� and Pacifism, 2008
	margins, at(antimili=(0(.1)1) dem=(0 1))
	marginsplot, noci graphregion(color(white)) title("PO: Democratization, 2008") xtitle("Pacifism") ytitle("ISAF mission support") ylabel(0(.2)1) ///
		scheme(s2mono) ///
		plot1opts(lcolor(gs0) mcolor(gs0)) ///
		plot2opts(lcolor(gs10) mcolor(gs10))
	window manage close graph

*Table A8.1: Interaction Effects of Perceived Objective and Policy Predisposition on ISAF Mission Support (column 2: 2009)
	reg afgh (fpr bp ps coin dem mid)##(inter c.antimili c.atla) po2 c.awa ///
		[pweight = gewicht] if year == 2009
		
*Figure A8.2: AMEs of Perceived Objectives, 2009 (Figure created in Excel)
	margins, dydx(fpr bp ps coin dem mid) at(inter=(0 1))
	margins, dydx(fpr bp ps coin dem mid) at(antimili=(0 1))
	margins, dydx(fpr bp ps coin dem mid) at(atla=(0 1))
	

